import { requestApi } from "@/utils/request";
import type { getTravelListByCategoryResponse } from "@/types/types-travel";

// 根据游记分类关键词查询游记
export const getTravelListByCategoryAPI = (params: {
    keywords: string;
    page: number;
}) => {
    return requestApi<getTravelListByCategoryResponse>({
        url: '/clAssifyTravels',
        method: 'GET',
        data: params,
    })
};

// 当地玩法：按地址和游记分类关键词查询游记
export const getTravelListByAddressAndCategoryAPI = (params: {
    address: string;
    keywords: string;
    page: number;
}) => {
    return requestApi<getTravelListByCategoryResponse>({
        url: '/addressQueryTravels',
        method: 'GET',
        data: params,
    })
}